  <!--类似于articlelist.php只不过显示的是主页的东西 更改是记得要和articlelist保持一致-->
<html>
<head>
<title>白马非马，黑马是马</title>
<base href="<?php echo base_url();?>">
<link rel="stylesheet" href="<?php echo base_url();?>css/index.css" type="text/css">
<style>

</style>

</head>
<body>

<div id="head">
<div id="banner">
<div id="header-img">
<h2 id="BlogTitle">美文美句</h2>
<h2 id="BlogSubTitle">美文欣赏</h2>
</div>
</div>
</div>


  <div id="header">
     <div class="nav clearfix">

        <div class="menu-sidebar_menu-container">
		
		    <ul id="menu-sidebar_menu" class="menu">
		        <li id="navbar-item-index">
					<a class="current-menu-item" title="美文美句" href="<?php echo site_url('former/index');?>">网站首页</a>
				</li>
				<?php foreach($category as $c){?>
		        <li >
					<a class="" href="<?php echo site_url('former/articlelist/'.$c['cid']);?>"><?php echo $c['name'];?></a>
                </li>
				<?php }?>

            </ul>
        </div>

     </div>	 

  </div>
  
  <div id="gonggao">
    <li class="gg">本站公告：本站提供抒情散文-情感文章-爱情语录-励志签名等在线欣赏，欢迎您的收看，如果喜欢可以添加书签方便访问。</li>
  </div>
  
  
  <div id="info">
        <div id="left" class="f1">
		   <div id="place"><i class="fa fa-hand-o-right"></i>
                <span>当前位置：</span>
                <a href="">网站首页</a>
           </div>
             
			<!--全是dl--><!--输出的是一块块的文章信息列表-->
			<?php foreach($articlelist as $a){?>
			<dl id="post">
			     
				<dt>
                    <span> <a class="label-important" title="抒情散文" href=""><?php echo $a['class'];?></a> </span>
                    <h2><a title="致我们人生中失去的那些朋友" href="<?php echo site_url('former/read_article/'.$a['id'].'/'.$a['cid']);?>"><?php $a['title']=preg_replace("/($info)/i","<b style=\"color:blue\">\\1</b>",$a['title']);echo $a['title'];?></a></h2>
                </dt>
				<div class="post-meta">
				    <span class="muteds">
                                <i class="fa fa-user">
                                    <a title="美文美句" href=""> <?php $a['author']=preg_replace("/($info)/i","<b style=\"color:red\">\\1</b>",$a['author']); echo $a['author'] ;?></a>
                                </i>
                    </span>  
					<span class="muted"><i class="fa fa-clock-o"> <?php $a['time']=preg_replace("/($info)/i","<b style=\"color:red\">\\1</b>",$a['time']);echo $a['time'];?></i></span>
                    <span class="muted"><i class="fa fa-eye"> 阅读(192)</i></span>
                    <span class="muteds"><i class="fa fa-comment">
                                            <a title="【致我们人生中失去的那些朋友】上的评论" rel="nofollow" href=""> 评论(3)</a>
                                         </i>
                    </span>
                </div>
				<dd>
                     <i><a title="致我们人生中失去的那些朋友" href=""><img alt="致我们人生中失去的那些朋友" src="http://luckyhai.com/sf_img1/aHR0cDovL2x1Y2t5aGFpLmNvbS96Yl91c2Vycy91cGxvYWQvMjAxNS8wOC8yMDE1MDgxNjE0Mzk3MTE5NzAxNzY2NzMuanBn-140-100-0-a.jpg" ></a>
                     </i><p>
					 <?php	$str=strip_tags($a['content']);
							$offset=(int)(strpos($str,$info,0)/3);
							$offset1=$offset+30;
							//echo $offset.'<br>'.$offset1;
							$str=preg_replace("/($info)/i","<b style=\"color:red\">\\1</b>",$str);
							echo mb_substr($str,0,120,'utf-8');?>...</p>  <!--mb_substr() 可以截取汉字-->
                </dd>
				<div class="post-footer">
                            <div class="tags"><i class="fa fa-tags">标签:
						        <a class="tag-link" title="查看标签为【抒情散文】的所有文章" href=""><?php echo $a['class'];?></a>丨</i>
                            </div>
						    <div class="readmore">
                                <a rel="bookmark" href="<?php echo site_url('former/read_article/'.$a['id'].'/'.$a['cid']);?>">阅读全文 »</a>
                            </div>
				</div>
				<div class="clear"></div>
            </dl>
			<?php }?>
			<!--文章信息块结束-->
		
			
            <div class="pagenav">  <!--分页-->
                <a class="on">1</a>
				<?php for($i=2;$i<10;$i++){?>
                <a class="ease" title="2" href=""><?php echo $i;?></a>
				<?php }?>
                <a class="c-nav next ease" title="›" href="">下一页</a>
                <a class="c-nav ease" title="末页" href="">末页 </a>
            </div>

	  </div> 
        <div id="right">
                    <dl class="widget divSearchPanel">
                 <header><h3>搜一下吧，搜你所找！</h3></header>
                <ul class="function">
                        
            <div id="bdcs">
                     <div class="bdcs-container">
                     <meta content="IE=9" http-equiv="x-ua-compatible">
                        <div id="default-searchbox" class="bdcs-main bdcs-clearfix">
                                <div id="bdcs-search-inline" class="bdcs-search bdcs-clearfix">
                                        <form id="bdcs-search-form" class="bdcs-search-form" autocomplete="off" target="_blank" method="post" action="<?php echo site_url('former/search');?>">
                                        
                                            <input id="bdcs-search-form-input" class="bdcs-search-form-input" type="text" placeholder="请输入关键词" name="sstxt" autocomplete="off" style="height: 36px; line-height: 36px;">
                                            <input id="bdcs-search-form-submit" class="bdcs-search-form-submit " type="submit" value="搜索">
                                        </form>
                                </div>
                                <div id="bdcs-search-sug" class="bdcs-search-sug" style="top: 38px; left: 2px; width: 245px; display: none;">
                                    <ul id="bdcs-search-sug-list" class="bdcs-search-sug-list"></ul>
                                </div>
                                <div id="bdcs-hot" class="bdcs-hot">
                                        <a class="bdcs-hot-item"  title="安妮宝贝" href="<?php echo site_url('former/articlelist/2');?>">安妮宝贝</a>
                                        <a class="bdcs-hot-item" target="_blank" title="抒情散文" href="<?php echo site_url('former/articlelist/2');?>">抒情散文</a>
                                        <a class="bdcs-hot-item" target="_blank" title="最美的年华" href="<?php echo site_url('former/articlelist/2');?>">最美的年华</a>
                                        <a class="bdcs-hot-item" target="_blank" title="经典美文" href="<?php echo site_url('former/articlelist/2');?>">经典美文</a>
                                        <a class="bdcs-hot-item" target="_blank" title="SEO博客" href="<?php echo site_url('former/articlelist/2');?>">SEO博客</a>
                                        
                                </div>
                        </div>
                    </div>
            </div>
                <ul>
                    </dl>
					
					<dl class="widget Tblogpublished">
                            <header>
                                <h3>热门文章</h3>
                            </header>
                            <ul class="function">
							    <?php foreach($hotarticle as $a){?>
                                <li> 
                                <a class="picbox" title="<?php echo $a['title'];?>" rel="bookmark" href="<?php echo site_url('former/read_article/'.$a['id'].'/'.$a['cid']);?>">
                                <img class="thumb" width="50" height="50" alt="<?php echo $a['title'];?>" title="<?php echo $a['title'];?>" src="<?php echo $a['url'];?>">
                                </a>
                                <h4 class="title">
                                <a title="<?php echo $a['title'];?>" href="<?php echo site_url('former/read_article/'.$a['id'].'/'.$a['cid']);?>"><?php echo $a['title'];?></a>
                                </h4>
                                <p class="postmeta">
                                    <span class="time"><?php echo $a['time'];?></span>
                                    <span class="eye">阅读（<?php echo $a['num'];?>）</span>
                                </p>
                                </li>
							<?php }?>
                            </ul>
                    </dl>
					
                    <dl class="widget 300250">
                    <header><h3>猜你喜欢</h3></header>
                        <ul class="function">
                        <script type="text/javascript">
                            var sogou_ad_id=472297;
                            var sogou_ad_height=250;
                            var sogou_ad_width=300;
                        </script>
                        </ul>
                    </dl>




						<dl class="widget Tblogpublished">
						<header><h3>随机文章</h3></header>
	                    <ul class="function">
	                	<?php foreach($randarticle as $a){?>
                                <li> 
                                <a class="picbox" title="<?php echo $a['title'];?>" rel="bookmark" href="<?php echo site_url('former/read_article/'.$a['id'].'/'.$a['cid']);?>">
                                <img class="thumb" width="50" height="50" alt="<?php echo $a['title'];?>" title="<?php echo $a['title'];?>" src="<?php echo $a['url'];?>">
                                </a>
                                <h4 class="title">
                                <a title="<?php echo $a['title'];?>" href="<?php echo site_url('former/read_article/'.$a['id'].'/'.$a['cid']);?>"><?php echo $a['title'];?></a>
                                </h4>
                                <p class="postmeta">
                                    <span class="time"><?php echo $a['time'];?></span>
                                    <span class="eye">阅读（<?php echo $a['num'];?>）</span>
                                </p>
                                </li>
								<?php }?>
	                    </ul>
	                    <dl>
					

		
		
		
		</div>
		<div class="clear"></div>
		
    </div>
  
  <!--尾部链接-->
  
  
    <div id="links">
            <h3>我的小伙伴们</h3>
			<div id="linkss">
			    <?php for($i=0;$i<10;$i++){?>
                <li><a target="_blank" title="好千渡网赚博客" href="http://www.haoqiandu.com/">好千渡网赚博客</a></li>
                <li><a target="_blank" title="励志分享网" href="http://www.8zti.com/">励志分享网</a></li>
                <?php }?>
           
            </div>
           <div class="clear"></div>
    </div>
	<div id="foot">
        <p>Powered By<a target="_blank" rel="nofollow" href="http://www.107lab.com/"> mcx && szj && yyy</a>And
	                <a title="提供抒情散文_情感文章_爱情语录等在线欣赏" target="target_blank" href="http://www.107lab.com">美文美句</a>
	    </p>
        <a target="" rel="nofollow" href="">内部测试使用 </a>
		
	</div>

  
  
  
  
  
  
  
  
  
</body>
</html>